import java.io.*;
import java.util.*;

class Main
{
    public static void main( String args[] )
    {
        boolean[][] visit = new boolean[ 21 ][ 201 ];
        int i, j, k, n;
        Scanner cin = new Scanner( System.in );
        while ( cin.hasNextInt( ) )
        {
            n = cin.nextInt( );
            for ( i = 0; i <= n; i++ )
                Arrays.fill( visit[ i ], false );
            visit[ 0 ][ 0 ] = true;
            for ( i = 1; i <= n; i++ )
                for ( j = i; j <= n; j++ )
                    for ( k = i * ( j - i ); k <= n * n / 2; k++ )
                        visit[ j ][ k ] |= visit[ j - i ][ k - i * ( j - i ) ];
            System.out.print( 0 );
            for ( i = 1; i <= n * n / 2; i++ )
                if ( visit[ n ][ i ] )
                    System.out.print( " " + i );
            System.out.println( );
        }
    };
};
